package cn.itsource.org.domain;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class Model {
    //部门ID
    @NotNull(message = "id不能为null")
    private Long id;

    //部门编号
//sn字段在Add分组中才会被校验 - NotEmpty
    @NotBlank(groups = {MyAdd.class},message = "部门编号不能为空")
    private String sn;

    //部门名称
//name字段在Add或Update分组中才会被校验 - NotEmpty
    @NotBlank(groups = {MyAdd.class, MyUpdate.class},message = "部门名称不能为空")
    private String name;
}
